package com.example.boot.webServices.cxf.client;

import com.example.boot.webServices.cxf.utlis.CxfInvokeUtil;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;

/**
 * @author ruiwu
 * @version V1.0
 * @Description:此处定义xml格式
 */
public class DemoClient {
    public static void main(String[] args) throws Exception {
      /*  JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
        Client client = dcf.createClient("http://localhost:8080/Service/demo?wsdl");
        Object[] invoke = client.invoke("CallInterface", "xxx","xxx");*/

        Object[] invoke =CxfInvokeUtil.invoke("http://localhost:8080/Service/demo?wsdl", "xxx", "xxx");
//输出调用结果
        System.out.println(invoke[0].getClass());
        System.out.println(invoke[0].toString());
    }

}
